home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Commodities / ColorSaver / Purity.rexx < prev    next >
OS/2 REXX Batch file  |  1996-09-26  |  1KB  |  73 lines

  1. /*
  2.  * ColorSaver ARexx example
  3.  * ColorSaver needs to be running.....
  4.  *
  5.  * Cycles screen through pure RED, GREEN and BLUE
  6.  */
  7.  
  8. Options FailAt 100
  9. Options Results
  10.  
  11. Delay = 5
  12.  
  13. if ~show(p, 'COLORSAVER.1') then
  14. do
  15.    Say ' '
  16.    Say 'Please start COLORSAVER first...'
  17.    exit
  18. end
  19.  
  20. Say ' '
  21. Say ' This ColorSaver ARexx example will cycle your screen through pure'
  22. Say ' RED, GREEN and BLUE screens pausing 'delay' seconds between each,'
  23. Say ' and then will restore your original colors.'
  24. Say ' '
  25. Say ' Press <RETURN> to continue '
  26. Pull Key .
  27.  
  28. Address COLORSAVER.1 STOREPALETTE
  29.  
  30. Address COLORSAVER.1 NUMCOLORS          /* get number of colors */
  31. Parse VAR Result Count
  32.  
  33.  do i=0 to Count-1
  34.   Address 'COLORSAVER.1' 'SELECT' i
  35.   Address COLORSAVER.1 GETRGB
  36.   Parse VAR Result Red Green Blue
  37.   Red = 15
  38.   Blue = 0
  39.   Green = 0
  40.   Address 'COLORSAVER.1' 'SETRGB Color='i', R='Red', G='Green', B='Blue
  41.  end
  42.  
  43. Address COMMAND wait delay
  44.  
  45.  do i=0 to Count-1
  46.   Address 'COLORSAVER.1' 'SELECT' i
  47.   Address COLORSAVER.1 GETRGB
  48.   Parse VAR Result Red Green Blue
  49.   Red = 0
  50.   Blue = 0
  51.   Green = 15
  52.   Address 'COLORSAVER.1' 'SETRGB Color='i', R='Red', G='Green', B='Blue
  53.  end
  54.  
  55. Address COMMAND wait delay
  56.  
  57.  do i=0 to Count-1
  58.   Address 'COLORSAVER.1' 'SELECT' i
  59.   Address COLORSAVER.1 GETRGB
  60.   Parse VAR Result Red Green Blue
  61.   Red = 0
  62.   Blue = 15
  63.   Green = 0
  64.   Address 'COLORSAVER.1' 'SETRGB Color='i', R='Red', G='Green', B='Blue
  65.  end
  66.  
  67. Address COMMAND wait delay
  68.  
  69. Address COLORSAVER.1 CANCEL
  70.  
  71. Say ' ...All Done....'
  72.  
  73.